<script setup lang="ts">
import { provide, ref } from 'vue';
import MyDialog from './components/MyDialog.vue';

// 1. app组件数据传递给child
const count = ref(0);
provide('count', count)
// 2. app组件函数传递给child，调用的时候可以回传数据
const updateCount = (num: number) => {
  count.value += num;
};
provide('updateCount', updateCount)
</script>

<template>
  <MyDialog>
    <template #footer>
      <button>卧槽</button>
      <button>尼玛</button>
    </template>
    <template #content>你要干什么？</template>
  </MyDialog>
</template>
